<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  <title>LADOSC tutorial</title>
  <meta name="generator" content="emacs" />
  <link href="using-ladosc-files/ingen-large.png" />
</head>

<body style="background-color: Grey;">
<a href="using-ladosc.html">main ladosc documentation</a>
<ol>
  <li>open an application that can use ladspa plugins, and control thier
    parameters <small>(eg. galan, ingen, om, pd, ardour, jack-rack)</small></li>
  <ol>
    <li>open up the osc_in plugin</li>
    <li>set the <em>port</em> control to the port you want to use (this should
      be a whole number from 49152 to 65535 inclusive). There can only be one
      program recieving messages on each port
      on a given computer, so opening the same port twice for listening will
      always fail.</li>
    <li>Set the <em>index_start</em> control (this is arbitrary, 0 works).</li>
    <li>Connect the <em>status</em> control to some sort of display, if that is
      not automatic. If there are any server errors, <em>status</em> will have
      a value other than 0. If <em>status</em> is 0, that should mean the
      server is in normal operation (or lack of operation if connect is 0).</li>
    <li>Set the <em>connect</em> control to 1. If it was already 1, switch it to
      0, then back to 1 again to reboot the server with the values you just
      set.</li>
    <li>Unless <em>status</em> has a value other than 0, then you are running
      an osc server, congratulations.</li>
    <li>connect the <em>out_0</em> control to something that lets you see or
      hear it change</li>
  </ol>
  <li>open an application that can use ladspa plugins, and use their control
    rate outputs meaningfuly <small>(eg. galan, ingen, om, pd)</small></li>
  <ol>
    <li>open up the osc_out plugin</li>
    <li>set the <em>port</em> control to the same value you used for the above
      example</li>
    <li>set the <em>octet_1</em> through <em>octet_4</em> controls to the ip
      address of the computer where you ran the first program (ie. if you are
      running the other application on the same computer, localhost is always
      127.0.0.1, so set
      <table summary="settings to connect to localhost"
	     border ="1"
	     cellpadding="5">
	<tr><td align="left"><em>octet_1</em></td>
	  <td align="right">127</td></tr>
	<tr><td align="left"><em>octet_2</em></td><td align="right">0</td></tr>
	<tr><td align="left"><em>octet_3</em></td><td align="right">0</td></tr>
	<tr><td align="left"><em>octet_4</em></td><td align="right">1</td></tr>
      </table>
      or, as another example, <code>nslookup google.com</code> tells me that
      google is 72.14.207.99, so if my buddy is running a synth at work over
      at google.com, and I want to control it, I set
      <table summary="settings to connect to google.com as of 4/20/08"
	     border="1"
	     cellpadding="5">
	<tr><td align="left"><em>octet_1</em></td>
	  <td align="right">72</td></tr>
	<tr><td align="left"><em>octet_2</em></td>
	  <td align="right">14</td></tr>
	<tr><td align="left"><em>octet_3</em></td>
	  <td align="right">207</td></tr>
	<tr><td align="left"><em>octet_4</em></td>
	  <td align="right">99</td></tr>
      </table>
    </li>
    <li>set the <em>index</em> control to the <em>index_start</em> parameter
      of the server</li>
    <li>connect the <em>status</em> control to something that lets you visualize
      its state. It will be set to something other than 0 if there is an error.
    </li>
    <li>set the <em>connect</em> control to 1. If it was already 1, reset it to
      zero and then reset it to one to reboot the transmitter with your new
      settings.</li>
    <li>connect the <em>input</em> control to something that lets you vary its
      value.</li>
    <li>vary the <em>input</em> control, and observe the <em>out_0</em> output
      in the other application.</li>
    <li>create a second osc_out, identical to the previous, but with an index
      one higher</li>
    <li>in the server application, connect the <em>out_1</em> control somewhere
      meaningful</li>
    <li>repeat until you have a sufficient set of controls. See the examples
      that come with this distrobution for some ideas of how to use this to
      make music. To use the examples, run one of the server examples and any
      number of client examples, each one has a script to invoke it.</li>
  </ol>
</ol>
</body>
</html>
